package cn.design.callback;

/**
 * @author dlq
 * @description
 * @date 2020/9/27 15:01
 * @since 1.0
 */
public class Teacher  implements CallBack{
    private Student student;
    public Teacher(Student student){
        this.student = student;
    }

    @Override
    public void fishWork(String message) {
        System.out.println(message);
    }

    public void makeStudentDoWork(){
        System.out.println("老师让"+student.getName()+"做作业");
        student.doWork(this);
    }
}
